""" this is main file that get executed as main process """
import os
import sys
import datetime
from datetime import datetime as dt
from resample import ResampleNPP
from postgres_server import Server
from utilities import __add_count__
from utilities import __make_year_dir__
from utilities import __remove_files__
from utilities import __julian_to_date__
from utilities import __move_to_save_dir__
from constants import __LOG_FILE__
from constants import __HOST__
from constants import __DBNAME__
from constants import __USERNAME__
from constants import __PASSWORD__
from constants import __PORT__
from constants import __HOME_DIR__
from constants import __HOME_DIR_DATA__
from constants import __HOME_DIR_RESAMPLE_DATA__

# change cur dir to home dir and create log file
os.chdir(__HOME_DIR__)

# main function that get executed at a fixed time everyday
def main():
	# resample and sql server objects
    res = ResampleNPP()
    res.__resample_hdf5_in_directory__("a.txt","./npp")
    del res
    return 1

main()
	
	
	

